package com.liu.yupao.model.enums;

import lombok.Getter;
/**
 * @author lqh
 * @since 2025-10-11 23:14
 * 队伍状态枚举类
 */
@Getter
public enum TeamStatusEnum {

    PUBLIC(0,"公开"),
    PRIVATE(1,"私有"),
    SECRET(2,"加密");

    private final Integer value;

    private final String text;

    TeamStatusEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    public static TeamStatusEnum getByValue(Integer value){
        if (value==null){
            return null;
        }
        for (TeamStatusEnum teamStatusEnum : TeamStatusEnum.values ()) {
            if (teamStatusEnum.getValue ().equals (value)){
                return teamStatusEnum;
            }
        }
        return null;
    }
}
